<?php
header("Pragma: public");
header("Expires: 0");
header("Accept-Ranges: bytes");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/vnd.ms-excel");
header('Content-Disposition: attachment; filename=moreinfo.xls');
header("Content-Transfer-Encoding: binary");
	//debug ($allinfo);
	foreach ($allinfo as $professioninfo):
		echo '<h2>'.$listprofessions[$professioninfo['profession_id']].'</h2>';
		echo '<table width="100%" border="0" cellspacing="2" cellpadding="2">';
		foreach ($professioninfo[0]['students'] as $moreinfo):
		echo '  <tr><td>'.$moreinfo['fio'] .'</td> <td>'.$moreinfo['moreinfo'].'</td></tr>';
		endforeach;
		echo '</table>';
	
	
	endforeach;
?>